/**
 * Copyright 2012 Impetus Infotech.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.impetus.client.gis;

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.impetus.kundera.gis.geometry.Point;
import com.impetus.kundera.index.Index;
import com.impetus.kundera.index.IndexCollection;

/**
 * @author Kuldeep Mishra
 * 
 */
@Embeddable
@IndexCollection(columns = { @Index(name = "currentLocation", type = "GEO2D"),
        @Index(name = "previousLocation", type = "GEO2D") })
public class Vehicle
{
    @Column(name = "CURRENT_VEHICLE_LOCATION")
    private Point currentLocation;

    @Column(name = "PREVIOUS_VEHICLE_LOCATION")
    private Point previousLocation;

    /**
     * @return the currentLocation
     */
    public Point getCurrentLocation()
    {
        return currentLocation;
    }

    /**
     * @param currentLocation
     *            the currentLocation to set
     */
    public void setCurrentLocation(Point currentLocation)
    {
        this.currentLocation = currentLocation;
    }

    /**
     * @return the previousLocation
     */
    public Point getPreviousLocation()
    {
        return previousLocation;
    }

    /**
     * @param previousLocation
     *            the previousLocation to set
     */
    public void setPreviousLocation(Point previousLocation)
    {
        this.previousLocation = previousLocation;
    }

}
